<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>水仙花数</title>
		<script type="text/javascript">
			var i=0;
			for (var n=100 ; n<1000 ; n++){
					var	a=parseInt(n/100);
					var	b=parseInt(n%100/10);
					var	c=parseInt(n%10);
					if(a*a*a + b*b*b + c*c*c==n){
						i++
						console.log( '水仙花数为'+ n );
					}
				}
				console.log('水仙花数总个数为' + i);
		</script>
	</head>
	<body>
		
	</body>
</html>
